const express = require('express')
const router = express.Router()

/**
 * 获取用户资料
 */
router.get('/:usrname', async (req, res, next) => {
  try {
    res.send('get /profiles/:usrname')
  } catch (error) {
    next(error)
  }
})

/**
 * 关注用户
 */
router.post('/:usrname/follow', async (req, res, next) => {
  try {
    res.send('post /profiles/:usrname/follow')
  } catch (error) {
    next(error)
  }
})

/**
 * 取消关注用户
 */
router.delete('/:usrname/follow', async (req, res, next) => {
  try {
    res.send('delete /profiles/:usrname/follow')
  } catch (error) {
    next(error)
  }
})

module.exports = router